home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- /**
- @Tool: insert IndexedLineSet~inserts the IndexedLineSet node. The IndexedLineSet node
- represents a 3D geometry formed by constructing polylines from 3D vertices
- specified in the coord field.
- @EndTool:
- @Summary: insert IndexedLineSet~inserts the IndexedLineSet node
- */
-
- var Node =
- "IndexedLineSet {" +
- "\n\t # set_colorIndex eventIn MFInt32" +
- "\n\t # set_coordIndex eventIn MFInt32" +
- "\n\tcolor NULL # exposedField SFNode" +
- "\n\tcoord NULL # exposedField SFNode" +
- "\n\tcolorIndex # field MFInt32" +
- "\n\t[" +
- "\n\t\t" +
- "\n\t]" +
- "\n\tcolorPerVertex TRUE # field SFBool" +
- "\n\tcoordIndex # field MFInt32" +
- "\n\t[" +
- "\n\t\t" +
- "\n\t]" +
- "\n}" +
- "\n@Caret";
-
- function DoCommand()
- {
- var textUtilities = getScriptObject("Library\\textUtilities.script");
- if (textUtilities)
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var lineIndex = textUtilities.InsertString(editor, Node);
-
- // Now replace @Caret with the real caret
- var range = editor.findFirst("@Caret", lineIndex, 0);
- editor.replace("", range);
- editor.setActive("Insert IndexedLineSet Node");
- }
- }
- }
-
- !!/Script
-
-